@extends('layouts.default') @section('main')
    <link rel="stylesheet" href="/css/uniform.css" />
    <link rel="stylesheet" href="/css/select2.css" />
    <div id="content">
        <div id="content-header">
            <div id="breadcrumb">
                <a href="{{url('home')}}" title="返回首页" class="tip-bottom"><i class="icon-home"></i> 首页</a>
                <a href="#" class="tip-bottom">项目管理</a>
                <a href="#" class="current">项目投递</a>
            </div>
        </div>
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span12">
                    @if(in_array('add',$actions))<a href="{{url('notice/create')}}"><button class="btn">新增</button></a>@endif


                    <form action="{{url('projectdeliver/search')}}" method="post">
                        <table>
                            <tr>
                                <th>
                                    <label >项目名称 :</label>
                                </th>
                                <th>
                                    <div class="controls">
                                        <input type="text" class="span11" name="project_subject" value="" placeholder="项目名称" />
                                    </div>
                                </th>


                                <th>
                                    <label >类型 :</label>
                                </th>
                                <th>
                                    <div class="controls">
                                        <select  name="is_send" class="span11" >
                                            <option value="">请选择</option>
                                            <option value="1">项目方发出</option>
                                            <option value="0">投资方发出</option>
                                        </select>
                                    </div>
                                </th>


                                <th>
                                    <label >状态 :</label>
                                </th>
                                <th>
                                    <div class="controls">
                                        <select  name="status" class="span11" >
                                            <option value="">请选择</option>
                                            <option value="1">有回应</option>
                                            <option value="0">等待中</option>
                                        </select>
                                    </div>
                                </th>


                                <th>
                                    <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                    <div class="controls">
                                        <button type="submit" class="btn btn-info">查询</button>
                                    </div>
                                </th>
                            </tr>
                        </table>
                    </form>

                    <div class="widget-box">
                        <div class="widget-title"> <span class="icon"><i class="icon-th"></i></span>
                            <h5>项目邀约</h5>
                        </div>
                        <div class="widget-content nopadding">
                            <table class="table table-bordered table-striped">
                                <thead>
                                <tr>
                                    <th>项目名称</th>
                                    <th>项目方</th>
                                    <th>投资方</th>
                                    <th>类型</th>
                                    <th>邀约理由</th>
                                    <th>拒绝理由</th>
                                    <th>状态</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($lists as $k => $v)
                                    <tr class="gradeX">
                                        <td>@if(isset($v->project)){{cut_str($v->project->subject,10)}}@endif</td>
                                        <td>@if(isset($v->user)){{$v->user->nickname or $v->user->realname}}@endif</td>
                                        <td>@if(isset($v->i_user)){{$v->i_user->nickname or $v->i_user->realname}}@endif</td>
                                        <td>@if($v->is_send==1)项目方发出@elseif($v->is_send==2)投资方发出 @endif</td>
                                        <td>{{$v->reason}}</td>
                                        <td>{{$v->refuse}}</td>
                                        <td>@if($v->status == 1)有回应@elseif($v->status == 0)等待@endif</td>
                                        <td class="center">
                                            @if(in_array('edit',$actions))<a data-original-title="编辑" class="tip" href="{{url('ztc/edit?id='.$list->id)}}"><i class="icon-pencil"></i></a>@endif
                                        </td>
                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                        </div>
                    </div>
                        <?php echo $lists->appends(['project_subject' => $project_subject,'status' => $status,'is_send' => $is_send])->render();?>
                </div>
            </div>
        </div>
    </div>
    <script src="/js/matrix.tables.js"></script>
@stop
